package com.liezh.memento;

/**
 * @author liezh
 * @date 2021-11-1
 */
public class Main {

    public static void main(String[] args) {
        Blog blog = new Blog("1", "test title", "test content !!!");
        final BlogMemento memento = blog.createMemento();
        blog.setContent("test content Memento !!!");
        System.out.println(blog.toString());
        blog.restore(memento);
        System.out.println(blog.toString());
    }
}
